package com.tsunami.authority.dto.auth;

import com.tsunami.authority.entity.auth.Menu;
import com.tsunami.model.ITreeNode;
import io.swagger.annotations.ApiModel;
import lombok.ToString;

import java.util.List;

/**
 * @Classname MenuTreeDTO
 * @Description TODO
 * @Date 2021-10-29 17:10
 * @Created by lx
 */
@ToString(callSuper = true)
@ApiModel(value = "ResourceTreeDTO", description = "资源树")
public class MenuTreeDTO extends Menu implements ITreeNode<MenuTreeDTO,Long> {
    private List<MenuTreeDTO> children;

    private String label;
    private String title;
    private Long key;

    @Override
    public Long getId() {
        return super.getId();
    }

    @Override
    public Long getCreateUser() {
        return super.getCreateUser();
    }

    @Override
    public Long getUpdateUser() {
        return super.getUpdateUser();
    }

    @Override
    public List<MenuTreeDTO> getChildren() {
        return this.children;
    }

    @Override
    public void setChildren(List<MenuTreeDTO> children) {
        this.children = children;
    }

    public String getLabel() {
        return this.getName();
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Long getKey() {
        return key;
    }

    public void setKey(Long key) {
        this.key = key;
    }
}
